/****************************************************************************

	COPYRIGHT(C) MAXSI SOFTWARE, JONAS 'SORTIE' TERMANSEN 2008, 2009, 2010

    This file is part of Maxsi Engine.

    Maxsi Engine is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Maxsi Engine is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with Maxsi Engine. If not, see <http://www.gnu.org/licenses/>.

	*/ #include "MaxsiEngineContributors.h" /*

	If you modify this file, please enter your name below and provide contact
	information in MaxsiEngineContributors.h. For more information please see
	MaxsiEngineContributors.h.
	
	Contributors to this file:

	- Jonas 'Sortie' Termansen
	- [your name here]

	MaxsiEngine.dll
	A linkable version of Maxsi Engine

	MaxsiList.h
	A system for handling char* based lists

****************************************************************************/

#ifndef MaxsiList_H
#define MaxsiList_H

#define DYNAMIC_LISTS

namespace MaxsiEngine
{
#ifdef DYNAMIC_LISTS
	typedef char** List;
	typedef char* ListC;
#else
	typedef char* List;
	typedef char* ListC;
#endif
	LINK	char*			BufferListToBuffer(List BufferList);

	LINK	List			BuildList		(size_t NumParameters, ...);
	LINK	List			BuildListEx		(size_t NumParameters, ...);
	LINK	List			CreateList		(size_t Size);
	#ifdef DYNAMIC_LISTS
	LINK	ListC			CreateListC		(size_t Size);
	LINK	bool			SetListSize		(List list, size_t NewSize);
	#endif
	LINK	bool			DeleteList		(List list);
	LINK	List			AddListEntry	(List list, char* Buffer, size_t BufferSize);
	LINK	void*			GetListEntry	(List list, size_t Number);
	LINK	bool			SetListEntry	(List list, size_t Number, char* Buffer, size_t BufferSize);
	LINK	size_t			GetListSize		(List list);
	LINK	size_t			GetListEntrySize(List list, size_t Number);
	LINK	List			DuplicateList	(List list);
}
#endif
